<template>
    <transition name="modal">
    <div class="modal-mask">
      <div class="modal-wrapper">
        <div class="modal-container">

          <div class="modal-header">
            <slot name="header">
              <!-- default heade -->
            </slot>
          </div>

          <div class="modal-body">
            <slot name="body">
             
            </slot>
          </div>

          <div class="modal-footer">
            <slot name="footer">
            <button class="modal-default-button around animated" @click="$emit('suerSubmit')">
                下载
              </button>
              <button class="modal-default-button around animated" @click="$emit('close')">
                取消
              </button>
            </slot>
          </div>
        </div>
      </div>
    </div>
  </transition>
</template>

<script>
export default {};
</script>

<style scoped>
.modal-mask {
  position: fixed;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: table;
  transition: opacity 0.3s ease;
}

.modal-wrapper {
  display: table-cell;
  vertical-align: middle;
}

.modal-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  width: 300px;
  margin: 0px auto;
  height: 300px;
  background-color: #fff;
  border-radius: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
  transition: all 0.3s ease;
  font-family: Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: relative;
}
.modal-container::after {
  position: absolute;
  color: #44c8f0;
  text-shadow: -12px -90px 1px #42b983,
               5px -50px 2px #42b952, 
               -5px 60px 2px #b1b942, 
                -85px -60px 2px #b1b942, 
                 85px -60px 2px #eb2ce1,
                  -95px -10px 2px #eb2ce1,
                 -5px 60px 2px #b1b942, 
                55px 50px 2px #4289b9, 
               -50px 10px 1px #ee6b1f;
  content: "Charsle";
}
.modal-header {
  margin-top: 14px;
  height: 40px;
  line-height: 40px;
  color: #42b983;
  font-size: 20px;
}

.modal-body {
  flex: 3;
  display: flex;
  align-items: center;
  color: #42b983;
  font-size: 40px;
  text-shadow: 2px 2px 4px #42b983;
}

.modal-default-button {
  background: #42b983;
  /* position: absolute; */
  height: 50px;
  width: 50px;
  border-radius: 100%;
  font-size: 14px;
  color: #fff;

}

.modal-enter {
  opacity: 0;
}

.modal-leave-active {
  opacity: 0;
}

.modal-enter .modal-container,
.modal-leave-active .modal-container {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}
.modal-footer::after {
  display: block;
  clear: both;
  content: "";
}

.animated {
  animation-duration: 2s; /*动画时间*/
  animation-fill-mode: both; /*播放后的状态*/
}

.animated {
  animation-iteration-count: infinite; /*动作循环的次数：infinite 无限循环*/
}

.animated {
  animation-duration: 2s; /*动画时间*/
}

.around {
  background-color: #44a036;
}

.around {
  animation-name: aroundAnimation; /*动画的名称*/
  transform-origin: center bottom; /*设置动画旋转元素的基点为*/
  cursor: pointer;
}

@keyframes aroundAnimation {
  0%,
  100%,
  20%,
  50%,
  80% {
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transition-timing-function: cubic-bezier(0.755, 0.5, 0.855, 0.06);
    transform: translate3d(-20px, 0, 0, 0);
  }
  70% {
    transition-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(-10px, 0px, 0);
  }
  90% {
    transform: translate3d(20px, 0, 0);
  }
}
</style>